package ferp.core.calc.scorer;

import ferp.core.calc.Calculator;
import ferp.core.game.Game;
import ferp.core.game.Settings;

/**
 * User: olegs
 * Date: 12/3/13 2:09 PM
 */
public class TrickingWithout3 extends Scorer
{
  public static final TrickingWithout3 instance = new TrickingWithout3();

  @Override
  protected void update(Game g, Settings settings, Calculator c)
  {
    // write to mountain weight of 3 tricks
    c.writeToMountain(g, g.declarer(), 3 * c.getPlayCostFailure(g.contract()));
  }

  @Override
  protected void statistics(Game g)
  {
    g.statistics.without3[g.player.declarer]++;
    g.statistics.updateTricking(g.player.declarer, g.contract(), g.contract() - 3);
  }
}
